import request from '@/utils/request'

//新增部门信息接口
export const addDepartmentData = (data) => {
    return request({
        url: ' /company/department',
        method: 'post',
        data: data
    })
}

//查询部门信息接口
export const getDepartmentListData = () => {
    return request({
        url: '/company/department',
        method: 'get'
    })
}

//根据ID查询部门信息接口
export const getDepartmentData = (id) => {
    return request({
        url: `/company/department${id}`,
        method: 'get'
    })
}

//修改部门信息接口
export const editDepartmentData = (data) => {
    return request({
        url: `/company/department${data.id}`,
        method: 'put',
        data
    })
}

//删除部门信息接口
export const delDepartmentData = (id) => {
    return request({
        url: `/company/department${id}`,
        method: 'DELETE'
    })
}